package com.example.day06;

import java.util.HashSet;
import java.util.Hashtable;
import java.util.LinkedHashSet;

public class HashSetTest {
    public static void main(String[] args) {

        HashSet<String> strings = new HashSet<>();
        strings.add("A");
        strings.add("B");
        strings.add("C");
        //strings.add("A");

        System.out.println(strings.size());

        for (String string : strings) {
            System.out.println(string);

        }

        LinkedHashSet<String> strings1 = new LinkedHashSet<>();
        strings1.add("A");
        strings1.add("B");
        strings1.add("C");
        strings1.add("C");
        System.out.println(strings1.size());

        for (String s : strings1) {
            System.out.println(s);
        }
    }
}
